package cn.edu.lingnan.tourism.controller;

import cn.edu.lingnan.tourism.pojo.Seller;
import cn.edu.lingnan.tourism.service.RouteService;
import cn.edu.lingnan.tourism.service.SellerService;
import cn.edu.lingnan.tourism.utils.Result;
import jakarta.annotation.Priority;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

//商家管理功能：
//        商家信息查看：允许用户查看商家的详细信息，包括商家名称、联系电话、地址等。
@RestController
@RequestMapping("/seller")
public class SellerController {
    @Resource
    private SellerService sellerService;

    @GetMapping("/getSellerDetails/{sellerId}")
    public String getSellerDetails(@PathVariable Integer sellerId){
        return new Result<>().success(sellerService.getSellerDetails(sellerId));
    }

    @GetMapping("/getRoutesBySeller/{sellerId}")
    public String getRoutesBySeller(@PathVariable Integer sellerId){
        return new Result<>().success(sellerService.getRoutesBySeller(sellerId));
    }

    @GetMapping("/getAllSeller")
    public String getAllSeller(){
        return new Result<>().success(sellerService.getAllSeller());
    }


}
